﻿<Page
    x:Class="LinkedInTestApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:LinkedInTestApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Button HorizontalAlignment="Center" VerticalAlignment="Center" Content="Login" Click="OnLoginClick" Margin="962,173,332,557"></Button>
        <TextBox HorizontalAlignment="Left" Margin="63,352,0,0" Name="txtProfile" TextWrapping="Wrap" Text="Press Get Profile to load the user info in this TextBox" VerticalAlignment="Top" Height="295" Width="349"/>
        <Button Content="Get profile" HorizontalAlignment="Left" Click="LoadAuthenticatedUserProfile" Margin="962,309,0,0" VerticalAlignment="Top"/>
        <Button Content="Get Email" Click="OnGetEmail" HorizontalAlignment="Left" Margin="962,352,0,0" VerticalAlignment="Top" Width="92"/>
        <Image HorizontalAlignment="Left" x:Name="profilePicture" Height="174" Margin="63,173,0,0" VerticalAlignment="Top" Width="160"/>
        <ListView x:Name="ConnectionsList" ItemsSource="{Binding Connections, Mode=TwoWay}" SelectionChanged="OnSelectionChanged" BorderThickness="1" BorderBrush="Black" HorizontalAlignment="Left" Height="474" Margin="452,173,0,0" VerticalAlignment="Top" Width="279">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="5">
                        <TextBlock Text="{Binding FirstName, Mode=TwoWay}" FontSize="20"></TextBlock>
                        <TextBlock Text="{Binding LastName, Mode=TwoWay}" FontSize="20"></TextBlock>
                        <TextBlock Text="{Binding Location, Mode=TwoWay}" FontSize="15"></TextBlock>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
        <Button Content="Make Request" HorizontalAlignment="Left" Margin="964,391,0,0" VerticalAlignment="Top" Click="Button_Click"/>
        <TextBox x:Name="ApiUri" HorizontalAlignment="Left" Margin="808,444,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Height="34" Width="469"/>
        <TextBox x:Name="ApiResult" HorizontalAlignment="Left" Height="147" Margin="808,514,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="469"/>
    </Grid>
</Page>
